<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/react/umd/react.development.js"></script>
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="./node_modules/babel-standalone/babel.js"></script>
    <style>
        .abc {
            color: red;
        }
    </style>
</head>
<body>
    <div id="app"></div>

    <!-- React 的注意事项
        1. 挂载的标记必须在一个标签内
        2. 单双标签必须闭合，xml语法 
        3. JavaScript中的关键字，是不能出现在标签中：例如：for, class

     -->
    <script type="text/babel">
        let oDiv = document.getElementById('app');

        let un = 'username';

        ReactDOM.render(
            <div>
                <label htmlFor={un}>姓名：</label>
                <input name="username" id="username" className="abc" type="text" />
            </div>,
            oDiv
            
        );
    </script>

</body>
</html>